//
//  UIWindowExtension.swift
//  WalkNovel
//
//  Created by Kevin on 2023/7/4.
//

import UIKit
#if DEBUG
import FLEX
#endif

extension UIWindow {
#if DEBUG
    /*
     在 DEBUG 情况下,晃动手机会出现调试界面，模拟器cmd+F
     */
    open override func motionBegan(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
        super.motionBegan(motion, with: event)
        if motion == .motionShake {
            FLEXManager.shared.isNetworkDebuggingEnabled = true
            FLEXManager.shared.showExplorer()
        }
    }
#endif
}


